From: Brion Vibber Date: Sun, 10 Apr 2005 00:03:49 +0000 (+0000) Subject: * (bug 1853) On 'go' match, try without quotes if given quoted term X-Git-Tag: 1.5.0alpha1~320 X-Git-Url: http://git.cyclocoop.org/%22.%24info%5B?a=commitdiff_plain;h=63b6f47edf211f75911e8c65f22636b52aaf2f97;p=lhc%2Fweb%2Fwiklou.git * (bug 1853) On 'go' match, try without quotes if given quoted term --- diff --git a/includes/SearchEngine.php b/includes/SearchEngine.php index a49f8e5043..e1de0bb3a5 100644 --- a/includes/SearchEngine.php +++ b/includes/SearchEngine.php @@ -42,6 +42,7 @@ class SearchEngine { * If an exact title match can be find, or a very slightly close match, * return the title. If no match, returns NULL. * + * @static * @param string $term * @return Title * @access private @@ -88,6 +89,11 @@ class SearchEngine { return $title; } + # Quoted term? Try without the quotes... + if( preg_match( '/^"([^"]+)"$/', $term, $matches ) ) { + return SearchEngine::getNearMatch( $matches[1] ); + } + return NULL; }